Skip to content

Conversation

@CheckYourSix
Copy link

When only one site exists in ADSites.xml, it doesn't import as an array. This results in $FirstSite = $ADSites.ADSites.Site[0] being empty, which causes the script to skip over renaming Default-First-Site-Name and add the site specified in ADSites.xml as a separate site. The domain controller would have to be manually switched to the new site.

I switched to the SelectNodes function for importing and adjusted the appropriate variables. I've tested this with a single entry and multiple entries in ADSites.xml and it works without issue. I also changed the log message to more accurately reflect what it's doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant